for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
// StringIndexOutOfBoundsException.js
"use strict";
// :: DEPENDENCIES
// load native dependencies
const path = require("path");
// load local dependencies
const IndexOutOfBoundsException = require(path.join(__dirname, "IndexOutOfBoundsException.js"));
// :: BASIC SETUP
/**
* Thrown by String methods to indicate that an index is either negative or greater than the size of the string. For
* some methods such as the charAt method, this exception also is thrown when the index is equal to the size of the
* string.
* @param {String} message - The message describing the <tt>StringIndexOutOfBoundsException</tt>.
* @param {Number} code - The unique code that identifies the cause of the <tt>StringIndexOutOfBoundsException</tt>.
* @augments IndexOutOfBoundsException
* @constructor
* @see https://docs.oracle.com/javase/8/docs/api/java/lang/StringIndexOutOfBoundsException.html
*/
const StringIndexOutOfBoundsException = function (message, code) {
IndexOutOfBoundsException.call(this, message, code);
};
// :: INHERITANCE
// set the IndexOutOfBoundsException 'class' as the parent in the prototype chain
StringIndexOutOfBoundsException.prototype = Object.create(IndexOutOfBoundsException.prototype);
StringIndexOutOfBoundsException.prototype.constructor = IndexOutOfBoundsException;
// :: PROTOTYPE
* The name used to identify a <tt>StringIndexOutOfBoundsException</tt>.
* @type {String}
* @default
StringIndexOutOfBoundsException.prototype.name = "StringIndexOutOfBoundsException";
// :: EXPORT
// export the StringIndexOutOfBoundsException 'class'
module.exports = StringIndexOutOfBoundsException;